<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%@include file="../common/top.jsp"%>
	<table class="table table-hover  table-bordered">
		<caption style="background-color: #428BCA;">
			<span class="label pull-left"
				style="font-family: white; font-size: 16px"><span class="local" data-local="flow_deploy_title">流程部署列表</span></span>
		</caption>
		<thead>
			<tr>
				<td><span class="local" data-local="flow_deploy_tbl_id">ID</span></td>
				<td><span class="local" data-local="flow_deploy_tbl_name">名称</span></td>
				<td><span class="local" data-local="flow_deploy_tbl_time">部署时间</span></td>
				<td><span class="local" data-local="flow_deploy_tbl_operator">操作</span></td>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${deploymentList }" var="deployment">
				<tr>
					<td>${deployment.id  }</td>
					<td>${deployment.name }</td>
					<td><fmt:formatDate value="${deployment.deploymentTime }"
							pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><a
						href="http://localhost:8888/simple_activiti/workflow/delete_deploy.do?id=${deployment.id  }"><span class="local" data-local="flow_deploy_btn_delete">删除</span></a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>



	<table class="table table-hover table-bordered">
		<caption style="background-color: #428BCA;">
			<span class="label pull-left"
				style="font-family: white; font-size: 16px"><span class="local" data-local="flow_process_title">流程定义列表</span></span>
		</caption>
		<thead>
			<tr>
				<td><span class="local" data-local="flow_process_tbl_id">ID</span></td>
				<td><span class="local" data-local="flow_process_tbl_name">名称</span></td>
				<td><span class="local" data-local="flow_process_tbl_key">Key值</span></td>
				<td><span class="local" data-local="flow_process_tbl_verison">版本</span></td>
				<td><span class="local" data-local="flow_process_tbl_deploy_id">部署ID</span></td>
				<td><span class="local" data-local="flow_process_tbl_res_name">流程定义的规则文件名称</span></td>
				<td><span class="local" data-local="flow_process_tbl_img_name">流程定义的规则图片名称</span></td>
				<td><span class="local" data-local="flow_process_tbl_operator">操作</span></td>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${processDefinitionList }" var="processDefinition">
				<tr>
					<td>${processDefinition.id }</td>
					<td>${processDefinition.name }</td>
					<td>${processDefinition.key }</td>
					<td>${processDefinition.version }</td>
					<td>${processDefinition.deploymentId }</td>
					<td>${processDefinition.resourceName }</td>
					<td>${processDefinition.diagramResourceName }</td>
					<td><a
						href="http://localhost:8888/simple_activiti/workflow/view_img.do?deploymentId=${processDefinition.deploymentId }&imageName=${processDefinition.diagramResourceName }"
						target="_blank"><span class="local" data-local="flow_process_btn_view_img">查看流程图</span></a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>


	<table class="table">
		<caption style="background-color: #428BCA;">
			<span class="label pull-left"
				style="font-family: white; font-size: 16px"><span class="local" data-local="flow_deploy_add">部署流程</span></span>
		</caption>
		<tr>
			<td>
				<form class="form-horizontal" role="form"
					action="http://localhost:8888/simple_activiti/workflow/upload.do"
					enctype="multipart/form-data" method="post" id="deployForm"
					style="width: 60%;">
					<div class="form-group">
						<label for="username" class="col-sm-3 control-label"><span class="local" data-local="flow_deploy_add_input_filename">请输入文件名称：</span></label>
						<div class="col-sm-9">
							<div class="input-group">
								<input type="text" class="form-control" name="fileNickName"
									placeholder="请输入文件名称" required="required" />
							</div>
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-offset-3 col-sm-9">
							<div class="input-group">
								<input type="file" id="inputfile" name="file">
							</div>
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-offset-3 col-sm-9">
							<button type="submit" class="btn btn-primary"><span class="local" data-local="flow_deploy_add_ok">发布流程</span></button>
						</div>
					</div>
				</form>

			</td>
		</tr>
	</table>
	<script type="text/javascript" src="${basePath }static/js/deploy.js"></script>
</body>
</html>